#!/usr/bin/perl -w

my $b = 0x44332211;
my $bb =  pack("N", $b);
printf "%lx\n",$bb;

my @b = (0x11, 0x22, 0x33, 0x44);
printf "pack: %04x\n", pack("L", @b);



print join(" ", map { sprintf "%#02x",$_ } 
           unpack("C*", pack("L",0x1234))), "\n";

print join(" ", map { sprintf "%#02x",$_ } 
           unpack("C*", pack("L",0x12345678))), "\n";


$x = "\xff\x00\x12\x34";
print join (" ", map { sprintf "%#02x", $_ } unpack("C*", $x)), "\n";
